package config

import (
	"github.com/hashicorp/hcl/v2"
	"github.com/zclconf/go-cty/cty"
)

type Body struct {
	hcl.Body `hcl:",remain"`
}

type Module struct {
	Range hcl.Range

	Name        string       `hcl:"name,label" cty:"name"`
	Description string       `hcl:"description,optional" cty:"description"`
	Groups      []string     `hcl:"groups,optional" cty:"groups"`
	Source      string       `hcl:"source,attr" cty:"source"`
	Inputs      *Body        `hcl:"inputs,block" cty:"inputs"`
	Terraform   *Terraform   `hcl:"terraform,block" cty:"terraform"`
	Generators  []*Generator `hcl:"generator,block" cty:"generator"`

	Skip           bool `hcl:"skip,optional" cty:"skip"`
	PreventDestroy bool `hcl:"prevent_destroy,optional" cty:"prevent_destroy"`

	DependsOn []string

	Outputs map[string]cty.Value

	TerraformInputNames []string
}
